<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">        
        <title>可用營地清單</title>        
        <style type="text/css">
            #Content2Div{
                width:600px;
                margin-left: 500px;
                margin-right: auto;
            }
            #CampTable2{
                width:100%;
                border-collapse:collapse;
            }
            #CampTable2 thead{                
                font-weight: bold;
                background-color: #FFFFCC;
            }
            #CampTable2 td{
                width:120px;
                padding:10px;
                border: black solid 5px;
            }
            #MapDiv
            { width:400px;
              text-align:center;
              float:left;
             }
             
            .TableList{
                width:100%;
                border-collapse:collapse;                
            }
            .TableList td{
                padding:10px;
                width:120%;
                text-align: center
            }
        </style>
        <script type="text/javascript" src="/Javacamping/scripts/jquery-1.11.1.min.js"></script>
        <script type="text/javascript">
            /*
                $(document).ready(function(){
                $("#ContinueBuyBtn").click(function(){
                    //history.back();
                    document.location="/MyStruts2Web/shop";
                });
                $("#ClearCartBtn").click(function(){
                    if(confirm("確定是否清空您的購物車？"))
                        document.location="/MyStruts2Web/shop/ClearCart";
                });
                $("#UpdateCartBtn").click(function(){
                    return confirm("確定是否更新您的購物車？");                        
                }); 
            });
            */
        </script>
    </head>
    <body>
         <jsp:include page="../tools/TopBanner.jsp"></jsp:include>
      
        <div id="MapDiv"> 
            <c:if test="${param.campID=='A'}">
                <img src="/JavaCamping/images/camp/camp01.jpg" title="營地A" style="border-width:0px;">
            </c:if>
            <c:if test="${param.campID=='B'}">
                <img src="/JavaCamping/images/camp/camp02.jpg" title="營地B" style="border-width:0px;">
            </c:if>             
            <c:if test="${param.campID=='C'}">
                <img src="/JavaCamping/images/camp/camp03.jpg" title="營地B" style="border-width:0px;">
            </c:if>
           
        </div>   
        <div id="Content2Div">
        <table id="CampTable2">
            <header>
                <tr>
                    <td align="center" >營地代碼</td>
                    <td align="center">營地名稱</td>
                    <td align="center">營地大小</td>
                    <td align="center">價格</td>
                    <td align="center"></td>
                </tr>
            </header>
            <c:forEach var="item" items="${camplist}">
                <tr>
                    <td align="center">${item["營地代碼"]}</td>
                    <td align="center">${item["營地名稱"]}</td>
                    <td align="center">${item["營地大小"]}</td>
                    <td align="center">${item["價格"]}</td>
                    <td>
                         <a href="/JavaCamping/booking/AddCart?id=${item["營地代碼"]}&campDate=${param.campDate}">
                         <img src="/JavaCamping/images/camp/shopcart_add_s.png" title="加入購物車" style="border-width:0px;"  height="30" width="30" />
                    </td>
                </tr>
            </c:forEach>
        </table> 
        </div>
         <%@include  file="../tools/PageFooter.jsp" %>
    </body>
   
</html>
